<?php
$hex = 0x502c;
$binary = base_convert($hex,16,2);
echo $binary;

